Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODMessageInterface


CreateEvent

The CreateEvent method creates an Apple event object.

ODSShort CreateEvent (in ODEventClass theAEEventClass,
                      in ODEventID theAEEventID,
                      in ODAddressDesc target,
                      in ODSLong transactionID,
                      out ODAppleEvent theResult);
theAEEventClass
The event class of the Apple event object to be created.
theAEEventID
The event ID of the Apple event object to be created.
target
A reference to the address of the destination part.
transactionID
A value that uniquely identifies this transaction.
theResult
A reference to the new Apple event object.
return value
The return ID assigned to this event.
DISCUSSION
Your part calls this method instead of the AECreateAppleEvent method defined by the Apple Event Manager. Your part does not need to specify a return ID for the Apple event object. Instead, OpenDoc assigns a return ID and uses that value to keep track of the sender of the event. The transactionID parameter should be used by your part to identify a related group of Apple event objects and their corresponding replies. If you are creating an event to send to another part, use the message interface's CreatePartAddrDesc method to create the target parameter.

After this method executes successfully, your part may add whatever data it wants to the resulting Apple event object and then send it using the message interface's Send method.

EXCEPTIONS
kODErrOutOfMemory
There is not enough memory to allocate the event object.
The Apple Event Manager may throw other exceptions.

SEE ALSO
The ODEventClass type (page 925).
The ODEventID type (page 925).
The ODMessageInterface::CreatePartAddrDesc method (page 414).
The ODMessageInterface::Send method (page 416).
The ODAddressDesc class (page 39).
The ODAppleEvent class (page 41).
Table 9-1 on page 408 in OpenDoc Programmer's Guide.
"Sending Semantic Events" on page 435 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help